package com.sctvcloud.zizhong.ui.activities;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.sctvcloud.zizhong.R;
import com.sctvcloud.zizhong.base.BaseActivity;
import com.sctvcloud.zizhong.ui.fragment.ApplyFragment;
import com.sctvcloud.zizhong.ui.fragment.CircleFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


public class CircleActivity extends BaseActivity {
    @BindView(R.id.title_top_layout_edit)
    protected CustomFontTextView share;

    @BindView(R.id.title_top_logo_layout)
    protected LinearLayout title_top_logo_layout;
    @BindView(R.id.title_top_title)
    protected CustomFontTextView title_top_title;
    @BindView(R.id.title_top_layout_back)
    protected ImageView title_top_layout_back;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle bundle = new Bundle();
        CircleFragment fragment = new CircleFragment();

        bundle.putString("channelId",String.valueOf(getIntent().getIntExtra(BaseActivity.EX_ID,0)));

        fragment.setArguments(bundle);
        fragment.setChannelUrl(getIntent().getStringExtra(BaseActivity.EX_URL));
        getSupportFragmentManager()
                .beginTransaction()
                .add(R.id.fragment_container,fragment)
                .commit();
       share.setVisibility(View.GONE);

        title_top_logo_layout.setVisibility(View.GONE);
        title_top_title.setVisibility(View.VISIBLE);
        title_top_title.setText(getText(R.string.home_entry4));
        share.setVisibility(View.GONE);
    }

    @Override
    protected void initInject() {
        setContentView(R.layout.activity_circle);
        ButterKnife.bind(this);
    }


    @OnClick({R.id.title_top_layout_back})
    public void itemClick(View view) {
        switch (view.getId()) {
            case R.id.title_top_layout_back:
                finish();
                break;
        }
    }

}
